import Vue from "vue";
import Vant from 'vant';
import Router from 'vue-router';
import App from "./App.vue";
import router from "./router";
import store from "./store";
import 'vant/lib/index.css';
import "amfe-flexible";
import "./assets/style/reset.css";    // 全局样式

const routerPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error=> error)
};

Vue.config.productionTip = false;
Vue.use(Vant);
if(process.env.NODE_ENV === "development"){
  require("./mock/mock.js")
}

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
